{% load i18n %}
{% load wiki_extras %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{% site_title %} - {% block page_title %}{{ page_title }}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/style.css">
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/jquery.treeview.css">
<script language="JavaScript">
<!--
var VIEW_URL = '{% url root %}view/';
var IFRAME_VIEW_URL = '{% url root %}iframe_view/';
var MEDIA_URL = '{{ MEDIA_URL }}';

function checkForm(){
  if(document.search_form.search_text.value == "") {
    document.search_form.search_text.focus();
    return false;
  }
  return true;
}
//-->
</script>
</head>
{% if render %}
<body onLoad="render()">
{% else %}
<body>
{% endif %}
<div id="header">
<table style="width:100%"><tr><td style="font-size:xx-large">{% site_title %}</td><td style="text-align:right">User: {% if user.is_authenticated %}{{ user.username }}{% else %}Anonymous{% endif %}<br/>{% if user.is_authenticated %}<a href="{% url djambe.wiki.views.logout_view %}?next={% logout_path request.path request.GET %}">Logout</a>{% else %}<a href="{% url django.contrib.auth.views.login %}?next={% login_path request.path request.GET %}">Login</a>{% endif %}</td></tr></table>
</div>
<div style="overflow:hidden;">
<div id="main">
<div class="inner">
{% block content %}{% endblock %}
</div>
</div>
<div id="sub">
<p><a href="{% url djambe.wiki.views.front_page %}">FrontPage</a></p>
<p><a href="{% url djambe.wiki.views.page_list %}">All Pages</a></p>
<p><a href="{% url djambe.wiki.views.history %}">History</a></p>
<p><a href="{% url djambe.wiki.views.blank_form %}">New Page</a></p>
{% if user.is_authenticated %}<p><a href="#" onClick="(function(){var d = new Date(); var mon = d.getMonth() + 1; document.location = '{% url root %}view/' + d.getFullYear() + '%E5%B9%B4' + mon + '%E6%9C%88' + d.getDate() +'%E6%97%A5/';})()">Quick Memo</a></p>
{% endif %}<hr>
<span style="font-weight:bold">Recent Changes</span>
{% if user.is_authenticated %}{% recent_changes user 5 %}{% else %}{% recent_changes '' 5 %}{% endif %}
{% tags %}
<hr>
<span style="font-weight:bold">Search</span>
<form name="search_form" method="get" action="{% url djambe.wiki.views.search %}" onSubmit="return checkForm()">
<input type="text" name="search_text" value="{{ word_list|join:" " }}">
<input type="submit" value="search">
</form>
</div>
</div>
<div id="footer" style="text-align:center">
<span class="small">Powerd by <a href="http://code.google.com/p/djambe/" target="_blank">djambe</a></span>
</div>
</body>
</html>
